/*
FieldEntity.h
Field Entitity Header file
Zach Agudelo, Andi Cescolini, Sam Tarin

Entities are objects that are drawn to the screen
This allows the drawing and updating of individual players, the ball, ect.
*/

#ifndef FIELDENTITY_H
#define FIELDENTITY_H

#include <vector>
 
#include "FieldAnimation.h"
#include "FieldSurface.h"
 
class FieldEntity {
    public:
        static std::vector<FieldEntity*>    EntityList;
 
        float           X; // Position on field
        float           Y; // Position on field
        int             Width;
        int             Height;
        int             AnimState;//frame of the bmp that is being displayed
        int             MaxFrames;
        float           Xbmp; //added
        float           Ybmp; //added
        float           xInitial;   //initial position on down
        float           yInitial;   //initial posiiont on down
        int             status;   //is the object a defender, offender, or other?
        float           resetX; //1st position set at start of program
        float           resetY; //1st position
        
        FieldEntity();
        virtual ~FieldEntity();
        virtual bool OnLoad(char* File, int Width, int Height, int MaxFrames, float X, float Y, int AnimState, int status);//initial setup
		  virtual void OnLoop();		//animates each player
        virtual void OnRender(SDL_Surface* Surf_Display); //draws entities
		  virtual void OnCleanup();	//frees memory
        void setOriginal(float); //sets to last down position
        void setPrevious(); //sets to game starting position
        
    protected:
        FieldAnimation      Anim_Control;
        SDL_Surface*    Surf_Entity;
};

#endif

